﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SingletonDemo
{
    class Earth
    {
        private Earth() { }
        private static Earth _earth = null;
        public static Earth CreateInstance()
        {
            if (_earth == null)
                _earth = new Earth();

            return _earth;
        }
        public string Name;


        public void Display()
        {
            Console.WriteLine(Name);
        }
    }
}
